const {getMusicHttp} = require("../../utils/http")
Page({

  /**
   * 页面的初始数据
   */
  data: {
    music:[],
    limit:15
  },

  onLoad: function (options) {
    var limit = this.data.limit;
    console.log(limit);
    getMusicHttp(limit).then(res=>{
      console.log(res.data.albums);
      var musics = res.data.albums;
      this.setData({
        musics
      })
    })
  },
  
 onReachBottom(){
   console.log("bottom");
   var limit = this.data.limit;
   console.log(limit);
   limit+=15;
   console.lo
   g(limit);
   getMusicHttp(limit).then(res=>{
    var musics = res.data.albums;
    this.setData({
      musics,
      limit
    })
   })
 },

})